package com.chixing.day10_hashcode_exception.word;

public class Factory {
    public static Car createCar(String brand){
        Car car = null;
        switch (brand){
            case "maserati":
                car = new MaseratiCar(brand);
                break;
            case "bmw":
                car = new BMWCar(brand);
                break;
        }
        return car;
    }
}
